package com.jsmile.cloud.msgcenter.api.to.login;

import javax.validation.constraints.NotBlank;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author 龚亮
 * @version 1.0
 * @desc 微信授权登录
 * @date 2019年04月01日 04:45:35
 */
@Data
@ApiModel
public class WxLoginTo {

    @ApiModelProperty(value = "appid")
    @NotBlank
    private String appid;

    @ApiModelProperty(value = "signature")
    private String signature;

    @ApiModelProperty(value = "iv")
    private String iv;

    @ApiModelProperty(value = "encryptedData")
    private String encryptedData;
    @ApiModelProperty(value = "rawData")
    private String rawData;

    @ApiModelProperty(value = "code")
    private String code;

    private WxUserInfo userInfo;

    @Data
    @ApiModel
    public static class WxUserInfo {
        private String openId;
        private String nickName;
        private String gender;
        private String language;
        private String city;
        private String province;
        private String country;
        private String avatarUrl;
        private String unionId;
    }
}
